// MemoryCell class
//  Object read( )         -->  Returns the stored value
//  void write( Object x ) -->  x is stored
package com.mathstruct;

public class MemoryCell<AnyType> {

    // Public methods
    public AnyType read() {
        return storedValue;
    }

    public void write(AnyType x) {
        storedValue = x;
    }

    // Private internal data representation
    private AnyType storedValue;
}
